/**
 * Wihidum - Efficient Broker Hierarchy for Publish Subscribe Middleware
 *
 * License      :   Apache License 2.0
 * Home Page    :   http://code.google.com/p/wihidum/
 * Mailing List :   wihidum@googlegroups.com
 */

package lk.mrt.cse.wihidum.util;

/**
 * Constants used by Wihidum
 */
public interface WihidumConstants
{
    interface TopologyNames
    {
        String treeTopology="TREE_TOPOLOGY";
        String clusterTopology="CLUSTER_TOPOLGY";
    }
    String currentTopology=TopologyNames.clusterTopology;

    interface MySelf
    {
        String myID="0.0.0.0";
        String myAddress="http://localhost:8080/axis2_A/services/Wihidum-Broker-Service";
        String myRole="SSCC";
    }
        
    /**
     * The operation constants
     */
    interface Operations
    {
        String SUBSCRIBE = "subscribe";
        String SUBSCRIBE_RESPONSE="SubscribeResponse";
        String GET_STATUS = "getStatus";
        String RENEW = "renew";
        String PUBLISH = "publish";
        String UNSUBSCRIBE = "unsubscribe";
        String GET_PUBLICATIONS = "getPublications";
        String STORE_PUBLICATION = "storePublication";
        String BROKER_SUBSCRIBE="broker_subscribe";
        String BROKER_PUBLISH="broker_publish";
        String BROKER_SUBSCRIBE_RESPONSE="broker_subscribe_response";

        String INSERT_BROKER = "insertBroker";
        String REMOVE_BROKER = "removeBroker";
        String GET_MESSAGE_TRACE = "getMessageTrace";
        String SET_MESSAGE_TRACE = "setMessageTrace";
        String CHANGE_TOPOLOGY = "changeTopology";
        String GET_NETWORK_MAP = "getNetworkMap";
        String HEART_BEAT = "heartBeat";

        String INSERT_BROKER_RESPONSE = "insertBrokerResponse";
        String REMOVE_BROKER_RESPONSE = "removeBrokerResponse";
        String GET_MESSAGE_TRACE_RESPONSE = "getMessageTraceResponse";
        String SET_MESSAGE_TRACE_RESPONSE = "setMessageTraceResponse";
        String CHANGE_TOPOLOGY_RESPONSE = "changeTopologyResponse";
        String GET_NETWORK_MAP_RESPONSE = "getNetworkMapResponse";
        String HEART_BEAT_RESPONSE = "heartBeatResponse";
        String GET_BROKER="getBroker";
        String GET_BROKER_RESPONSE="getBrokerResponse";
        //When a new broker is inserted to the admin service, it sends update messages to already connected clients 
        String Update_Client="updateClientOnBrokers";

        String GET_SUBSCRIBED_TOPICS="getSubscribedTopics";
        String GET_SUBSCRIBED_TOPICS_RESPONSE="getSubscribedTopicsResponse";
    }

    /**
     * End point references in wihidum
     */
    interface EndPointReferences
    {
        String BROKER_SERVICE_EPR = "http://localhost/axis2/services/Wihidum-Broker-Service";
        String PUBLISHER_SERVICE_EPR = "http://localhost/axis2/services/Wihidum-Publisher-Service";
        String SUBSCRIBER_SERVICE_EPR = "http://localhost/axis2/services/Wihidum-Subscriber-Service";
        String LISTENER_SERVICE_EPR = "http://localhost/axis2/services/Wihidum-Listener-Service";
    }

    /**
     * Actions for action mapping
     */
    interface Actions
    {
        String Subscribe = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe";
        String SubscribeResponse =
                "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse";
        String Renew = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew";
        String RenewResponse = "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse";
        String Unsubscribe = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe";
        String UnsubscribeResponse =
                "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse";
        String GetStatus = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus";
        String GetStatusResponse =
                "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse";
        String Publish = "http://ws.apache.org/ws/2007/05/eventing-extended/Publish";
    }

    /**
     * Message elements
     */
    interface MessageElements
    {
        String PUBLICATION_HEADER = "PublicationHeader";
        String BROKER_PUBLICATION_HEADER = "BrokerPublicationHeader";
        String BROKER_SUBSCRIBE_RESPONSE="BrokerSubscribeResponse";
    }
}
